<template>
  <div class="leftCenter" style="width: 100%; height: 100%">
    <iframe
        :src="path"
        frameborder="1"
        style="width: 100%; height: 85vh"
    ></iframe>

    <!-- <div style="width: 25%; background-color: white">
      <div>
        <el-card style="max-width: 400px">
          <template #header>
            <div class="card-header">
              <el-avatar
                  src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
              />
              用户名称：
            </div>
          </template>
          <span style="font-size: 14px">评论内容： </span>
          <p class="text item">{{}}</p>
        </el-card>
      </div> -->

    <!-- <el-card class="box-card" v-for="(item,index) in 3" :key="index">
              <div slot="header" class="clearfix">
                    <el-avatar
                      style="float: left; top: 4px;"
                      src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
                    />
                    <div style="font-size: 15px;">
                      用户名称:{{index}}
                     </div> 
              </div>
              <div class="text item">
                  <span>评论内容</span>
            </div>
          </el-card> -->
  </div>
  <!-- </div> -->
</template>

<script>
export default {
  data() {
    return {
      path: "",
      id: "",
      from: {}
    };
  },
  watch: {
    // 监视搜索词变化
    "$route.query.path": {
      immediate: true,
      handler() {
        this.path = this.$route.query.path;
      }
    },
    // 监视搜索词变化
    "$route.query.id": {
      immediate: true,
      handler() {
        this.id = this.$route.query.id;
      }
    }
  },
  created() {
  },
  methods: {
    getDocument() {
      getComments(this.id).then(response => {
        this.from = response.data;
      });
    }
  }
};
</script>

<style>
.leftCenter {
  display: flex;
  float: left;
}
</style>
